import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const Home = () => import("@/views/Home");
const Production = () => import("@/views/Production");
const ThreeNav = () => import("@/views/ThreeNav");
const YueTu = () => import("@/components/production/YueTu.vue");
const HuDie = () => import("@/components/production/HuDie.vue");
const JiXiangJie = () => import("@/components/production/JiXiangJie.vue");
const JiaoYe = () => import("@/components/production/JiaoYe.vue");

const routes = [
  {
    path: "",
    redirect: "/home",
  },
  {
    path: "/home",
    component: Home,
  },
  {
    path: "/production",
    component: Production,
    children: [
      {
        path: "1",
        component: YueTu,
      },
      {
        path: "2",
        component: HuDie,
      },
      {
        path: "3",
        component: JiXiangJie,
      },
      {
        path: "4",
        component: JiaoYe,
      },
    ],
  },
  {
    path: "/threenav",
    component: ThreeNav,
  },
  {
    path: "/know",
    component: () => import("@/views/Know.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  routes,
});

export default router;
